package generator;

import org.mybatis.generator.api.ShellRunner;

/**
 * @author zhangyanqi
 * @since 1.0 2017/9/16
 */
public class Main {

    /**
     * 传入命令,执行逆向工程
     *
     * @param cmd
     * 语法:
     * -configfile,</xxx/xxx/mybatis-generate-config.xml(路径为绝对路径)>,-overwrite
     * 例子:
     * -configfile,/Users/zhangyanqi/project/qqrwservice/src/main/resources/mybatis/mybatis-generate-config-sample.xml,-overwrite
     */
    public static void generate(String cmd) {
        ShellRunner.main(cmd.split(","));
    }
}
